package com.itheima1.dao.impl;

import com.itheima1.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

@Repository("userdao")
public class UserDaoImpl implements UserDao {
    @Autowired
    private JdbcTemplate template;

    public void operaAdd() {
        String sql="update account set balance = 2500 where id=1";
        template.update(sql);
    }

    public void operaDel() {
        String sql="update account set balance = 3500 where id=2";
        template.update(sql);
    }
}
